<?php defined('SYSPATH') OR die('No direct access allowed.');

abstract class Forum_Controller extends Frontend_Controller {

	public $template = 'forum/main';

	public function __construct() {
      parent::__construct();
			$nav = new View('forum/blocks/nav');
			$nav->breadcrumb = array();
      $this->template->set_global('forum_href', Router::uri('forum', array('controller'=>'category'))."/");
      if ($this->user === FALSE) {
				$this->template->login = new View('forum/login/guest');
			}
			else {
				$this->template->login = new View('forum/login/logged');
			}
      $this->template->head['css']['media/css/forum.css'] = 'all';
			$this->template->head['suffix'] = Kohana::lang('forum.suffix');
      $nav->separator = Kohana::config('forum.bc_separator');
			$this->template->nav = $nav;
			$this->template->set_global('acl', $this->acl);
			mmanager::set_current('forum');
    }
}